import React from 'react';
// import Zcon from '@cbd/icon';
import { Button } from 'antd';

const CardTitle = (props) => {
  const { total = 0, handleCreateVisible, handleImportVisible, addVisible } = props;
  return (
    <div style={{ display: 'flex',justifyContent: 'space-between', alignItems: 'center'}}>
      <span className='list__title'>{`流程模型列表（${total}）`}</span>
      <div>
        {addVisible && (
        <Button className='list__btn' type="primary" size='small' onClick={() => handleCreateVisible(true)}>
          {/* <Zcon type='plus' style={{ fontSize: '14px' }} /> */}
          <span>新增流程模型</span>
        </Button>
      )}
        <Button className='list__btn' type="primary" size='small' style={{marginLeft: '20px'}} onClick={() => handleImportVisible(true)}>
          导入流程模型
        </Button>
      </div>
    </div>
  );
}
export default CardTitle;